package com.xbongbong.paas.service.workflow.detail;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.pojo.workflow.task.dto.WorkflowNodeTaskGetDTO;
import com.xbongbong.paas.pojo.workflow.task.vo.WorkflowNodeTaskGetVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.formdata.pojo.dto.SaasAnalysisDataDTO;

import java.util.List;

/**
 * @author 吴峰
 * @date 2023/01/06 9:45
 */

public interface WorkflowApproveDetailServiceInterface {

    /**
     * 工作流详情页方法
     * @param workflowNodeTaskGetDTO
     * @return
     * @throws XbbException
     */
    WorkflowNodeTaskGetVO detail(WorkflowNodeTaskGetDTO workflowNodeTaskGetDTO) throws XbbException;

    /**
     * 解析关联产品
     * @param saasAnalysisDataDTO
     * @param data
     * @param explainList
     * @param formCopy
     * @throws XbbException
     */
    void formatProduct(SaasAnalysisDataDTO saasAnalysisDataDTO, JSONObject data, List<FieldAttrEntity> explainList, boolean formCopy) throws XbbException;

    /**
     * 获取数据
     * @param dataId
     * @param corpid
     * @param saasMark
     * @param businessType
     * @return
     * @throws XbbException
     */
    PaasFormDataEntityExt getFormData(Long dataId, String corpid, Integer saasMark, Integer businessType) throws XbbException;

    /**
     * 获取解释
     *
     * @param corpid
     * @param formId 表单id
     * @param businessType
     * @param data 流程数据，用于拿到一些解释
     * @return
     * @throws XbbException
     */
    List<FieldAttrEntity> getPaasFormExplain(String corpid, Long formId, Integer businessType, JSONObject data) throws XbbException;
}
